home *** CD-ROM | disk | FTP | other *** search
- Path: fangz.com!not-for-mail
- From: shad@fangz.com (Shadow.King)
- Newsgroups: comp.lang.c++
- Subject: C++ timer
- Date: 20 Jan 1996 04:12:36 -0500
- Organization: fangz.com
- Message-ID: <4dqbm4$huk@fangz.com>
- NNTP-Posting-Host: fangz.com
- X-Newsreader: TIN [UNIX 1.3 BETA-950824-color PL0]
-
- I'm fairly new to C++ and I was wondering if anyone out there had any
- tips on creating a program that would run a specified function every so
- often. something like a while loop with constant clock checks to see if
- one second has passed. I want to be able to specify times a lot less than
- one second though.. I was trying the clock() function and using a few
- variables as a stop watch to mark start and end times and calculate tick
- in between but I can't seem to come up with something that works right.
- IF anyone could give me any tips or show some example code of something
- similr I'd be much appreciated.
-